﻿using LinFu.Proxy.Interfaces;

namespace CoreEx.Database.Client
{
    /// <summary>
    /// Represents a class that is capable of creating an <see cref="IProxy"/> instance for a target instance of <typeparamref name="T"/>.
    /// </summary>
    /// <typeparam name="T">The actual target instance type.</typeparam>
    public interface IProxyFactory<T>
    {
        /// <summary>
        /// Creates a <see cref="IProxy"/> instance for the <paramref name="actualTarget"/>.
        /// </summary>
        /// <param name="actualTarget">The actual target instance.</param>
        /// <returns>An <see cref="IProxy"/> instance that implements the <typeparamref name="T"/> interface.</returns>
        T CreateProxy(T actualTarget);        
    }
}
